.outpainting {
  width: 100%;
  height: 100vh; // 改为视口高度
  background: #fff;
  display: flex;
  flex-direction: column;

  .header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;

    .headerTitle {
      .anticon {
        font-size: 14px; // 图标大小也相应调整为 14px
      }

      h4 {
        font-size: 14px;
        margin: 0;
        font-weight: 500;
      }
    }

    .headerContent {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .ratioButtonsWrapper {
        flex: 1;
        display: flex;
        justify-content: center;

        .ratioButtons {
          display: flex;
          gap: 8px;
          overflow-x: auto;
          padding: 4px 0;

          &::-webkit-scrollbar {
            display: none;
          }

          .ratioButton {
            padding: 4px 8px;
            border-radius: 4px;
            cursor: pointer;
            color: #333;
            // background: #f5f5f5;
            white-space: nowrap;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 500;

            &:hover {
              background: #e6e6e6;
            }

            &.selected {
              background: #333;
              color: #fff;
            }

            span {
              font-size: 12px;
            }

            &.disabled {
              pointer-events: none;
              opacity: 0.5;
            }
          }
        }
      }

      .closeBtn {
        color: #666;
        cursor: pointer;
        padding: 8px;
        white-space: nowrap;

        &:hover {
          color: #333;
        }
      }

      .headerTitle {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        color: #333;
        font-weight: 500;
        min-width: 80px;

        .anticon {
          font-size: 16px;
        }
      }
    }
  }

  .content {
    flex: 1;
    overflow: hidden;
    position: relative;

    .imageContainer {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;

      .imageWrapper {
        position: relative;
        display: inline-block;

        img {
          display: block;
          max-width: 100%;
          max-height: 100%;
          transform-origin: center;
          transition: transform 0.3s ease;
        }

        .expandFrame {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          background-color: rgba(128, 128, 128, 0.3);
          border: 1px dashed rgba(255, 255, 255, 0.5);
          transform-origin: center;
          pointer-events: auto;

          .corner {
            position: absolute;
            width: 8px;
            height: 8px;
            background: #fff;
            border: 1px solid #0fbaad;
            pointer-events: auto;
            z-index: 1;

            &.topLeft {
              top: -4px;
              left: -4px;
              cursor: nw-resize;
            }

            &.topRight {
              top: -4px;
              right: -4px;
              cursor: ne-resize;
            }

            &.bottomLeft {
              bottom: -4px;
              left: -4px;
              cursor: sw-resize;
            }

            &.bottomRight {
              bottom: -4px;
              right: -4px;
              cursor: se-resize;
            }
          }
        }
      }
    }
  }

  .footer {
    padding: 16px;
    display: flex;
    justify-content: center;
    border-top: 1px solid #f0f0f0;
    background: #fff;

    .generateButton {
      width: 40%;
      height: 40px;
      background-color: #0fbaad;
      border-radius: 8px;
      color: white;
      font-size: 14px;
      font-weight: bold;

      &:hover {
        background-color: #0fbaad
      }
    }
  }
}

.ratioIcon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;

  >div {
    width: 100%;
    height: 100%;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    transform: scale(0.8);
  }
}